package com.zhouyou.http.interceptor;

import com.west.common.bean.Constants;
import com.west.common.helper.AccountHelper;

import java.util.TreeMap;

/**
 * @author hanyulang
 * @date 2018/10/19
 */
public class DefaultDynamicInterceptor extends BaseDynamicInterceptor<DefaultDynamicInterceptor> {

    @Override
    public TreeMap<String, String> dynamic(TreeMap<String, String> dynamicMap) {
        if(isAccessToken()){
            dynamicMap.put(Constants.ACCESSTOKEN, AccountHelper.getToken());
            dynamicMap.put(Constants.UID, AccountHelper.getUserId());
        }
        return dynamicMap;
    }

}
